<%@page import="com.jsz.peini.common.util.PeiniUtils"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">

<meta charset="UTF-8">
<title>Document</title>
<meta name="viewport"
	content="initial-scale=1, width=device-width, maximum-scale=1, user-scalable=no">
	
 <meta content="telephone=no" name="format-detection" />
<link rel="stylesheet" type="text/css" href="css/index.css">
<link rel="stylesheet" type="text/css" href="css/pay.css">
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="js/startScore.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
	if($(".det-list").length==1){
		$(".aa ul").removeClass("adline")
	}
	else if($(".det-list").length==2){
		$(".aa ul").addClass("adline")
	}
	})
</script>
</head>
<body>
	<section class="cod-man">
		<div>
			<div class="man-num">
				订单号：${detail.orderCode }
				<!-- <div class="resu w-p"> -->
					<c:choose>
						<c:when test="${detail.orderStatus == 0 }">
						<div class="resu w-p">
	 									待付款
	 					</div>
	 				</c:when>
						<c:when test="${detail.orderStatus == 1 }">
						<div class="resu w-e">
	 									待评价
	 					</div>
	 				</c:when>
						<c:when test="${detail.orderStatus == 2 }">
						<div class="resu ok-p">
	 									已完成
	 					</div>
	 				</c:when>
						<c:when test="${detail.orderStatus == -1 }">
						<div class="resu can-p">
	 									已取消
	 					</div>
	 				</c:when>
					</c:choose>
				<!-- </div> -->
			</div>
			<div class="man-con ">
				<img src="${detail.userImageHead }" alt="">
				<div class="name">
					<h4>${detail.userNickname }</h4>
					<c:choose>
						<c:when test="${detail.orderType == 1 }">
							<p>
								下单时间：
								<fmt:formatDate value="${detail.orderTime }"
									pattern="yyyy-MM-dd HH:mm" />
							</p>
							<p>
								预约时间：
								<fmt:formatDate value="${taskInfo.taskAppointedTime }"
									pattern="yyyy-MM-dd HH:mm" />
							</p>
						</c:when>
						<c:otherwise>
							<p>
								下单时间：
								<fmt:formatDate value="${detail.orderTime }"
								pattern="yyyy-MM-dd HH:mm" />
							</p>
							<p>
								预约时间：————
								<%-- <fmt:formatDate value="${taskInfo.taskAppointedTime == null?'----:--':taskInfo.taskAppointedTime}"
								pattern="yyyy-MM-dd HH:mm" /> --%>
							</p>
							
						</c:otherwise>
					</c:choose>
				</div>
				<div class="method">
					<c:choose>
						<c:when test="${detail.orderType == 1 }">
							<c:choose>
								<c:when test="${taskInfo.otherBuy == 1 }">
		 									发起人买单
		 								</c:when>
								<c:when test="${taskInfo.otherBuy == 2 }">
		 									接收人买单
		 								</c:when>
								<c:when test="${taskInfo.otherBuy == 3 }">
		 									AA
		 								</c:when>
							</c:choose>
						</c:when>
						<%-- <c:otherwise>
		 							接收人买单
		 						</c:otherwise> --%>
					</c:choose>
				</div>
			</div>
		</div>
	</section>
	<section class="cod-det">
		<div>
			<h6>付款详情</h6>
			<c:if test="${detail.otherBy == null || detail.otherBy == 1 || detail.otherBy == 3}">
				<div class="det-list aa">
					<ul>
						<li>付款人：${detail.userNickname }</li>
						<li>账单编号：${userOrder.orderCode }</li>
						<li>付款时间： <c:choose>
								<c:when
									test="${userOrder.orderTime != null && userOrder.orderTime != '' }">
									<fmt:formatDate value="${userOrder.orderTime }"
										pattern="yyyy-MM-dd HH:mm" />
								</c:when>
								<c:otherwise>
			 						————
			 					</c:otherwise>
							</c:choose>
						</li>
						<li>付款方式： <c:if
								test="${userOrder.payType == null || userOrder.payType == '' }">
			 					——
			 				</c:if> <span class="meth"> <c:choose>
									<c:when test="${userOrder.payType == 1 }">
										<i class="gold-p"></i>
									</c:when>
									<c:when test="${userOrder.payType == 2 }">
										<i class="w-p"></i>
									</c:when>
									<c:when test="${userOrder.payType == 3 }">
										<i class="al-p"></i>
									</c:when>
								</c:choose> <c:if
									test="${userOrder.discount*1 != 100 && userOrder.discount != ''}">
			 					(${userOrder.discount*1/10 }折)
			 				</c:if>
						</span>
						</li>
						<li>应付金额： <c:choose>
								<c:when
									test="${userOrder.allMoney != null && userOrder.allMoney != '' }">
									¥<fmt:formatNumber value="${userOrder.allMoney/100 }" pattern="#.00" />
								</c:when>
								<c:otherwise>
			 						——
			 					</c:otherwise>
							</c:choose>
						</li>
						<li>用户实付： <span class="real"> <c:choose>
									<c:when
										test="${userOrder.payMoney != null && userOrder.payMoney != '' }">
										¥<fmt:formatNumber value="${userOrder.payMoney/100 }" pattern="#.00"/>
									</c:when>
									<c:otherwise>
			 						——
			 					</c:otherwise>
								</c:choose>
						</span>
						</li>
						<c:if test="${detail.orderStatus == 2 }">
							<c:choose>
								<c:when test="${judge1 != null}">
									<li><div class="stars">
											<span>用户评价：</span>
											<div class="show_number clearfix">
												<div class="atar_Show">
													<p tip="${judge1/20 }"></p>
												</div>
											</div>
										</div></li>
								</c:when>
								<c:otherwise>
									<li><div class="stars">
											<span>用户评价：</span> <span class="meth">(尚未评价)</span>
										</div></li>
								</c:otherwise>
							</c:choose>
						</c:if>
					</ul>
				</div>
			</c:if>
			
			<c:if test="${detail.otherId != null && detail.otherId != '' && (detail.otherBy == 2 || detail.otherBy == 3)}">
				<div class="det-list ">
					<ul>
						<li>付款人：${detail.otherNickname }</li>
						<li>账单编号：${otherOrder.orderCode }</li>
						<li>付款时间： <c:choose>
								<c:when
									test="${otherOrder.orderTime != null && otherOrder.orderTime != '' }">
									<fmt:formatDate value="${otherOrder.orderTime }"
										pattern="yyyy-MM-dd HH:mm" />
								</c:when>
								<c:otherwise>
			 						——
			 					</c:otherwise>
							</c:choose> <%-- <fmt:formatDate value="${otherOrder.orderTime }" pattern="yyyy-MM-dd hh:mm" /> --%>
						</li>
						<li>付款方式： <c:if
								test="${otherOrder.payType == null || otherOrder.payType == '' }">
			 						——
			 				</c:if> <span class="meth"> <c:choose>
									<c:when test="${otherOrder.payType == 1 }">
										<i class="gold-p"></i>
									</c:when>
									<c:when test="${otherOrder.payType == 2 }">
										<i class="w-p"></i>
									</c:when>
									<c:when test="${otherOrder.payType == 3 }">
										<i class="al-p"></i>
									</c:when>
								</c:choose> <c:if
									test="${otherOrder.discount*1 != 100 && otherOrder.discount != null && otherOrder.discount != ''}">
			 					(${otherOrder.discount*1/10 }折)
			 				</c:if>
						</span>
						</li>
						<li>应付金额： <c:choose>
								<c:when
									test="${otherOrder.allMoney != null && otherOrder.allMoney != '' }">
									¥<fmt:formatNumber value="${otherOrder.allMoney/100 }" pattern="#.00" />
								</c:when>
								<c:otherwise>
			 						——
			 					</c:otherwise>
							</c:choose>
						</li>
						<li>用户实付：<span class="real"> <c:choose>
									<c:when
										test="${otherOrder.payMoney != null && otherOrder.payMoney != '' }">
										¥<fmt:formatNumber value="${otherOrder.payMoney/100 }" pattern="#.00"/>
									</c:when>
									<c:otherwise>
			 						——
			 					</c:otherwise>
								</c:choose>
						</span>
						</li>
						<c:if test="${detail.orderStatus == 2 }">
							<c:choose>
								<c:when test="${judge2 != null}">
									<li><div class="stars">
											<span>用户评价：</span>
											<div class="show_number clearfix">
												<div class="atar_Show">
													<p tip="${judge2/20 }"></p>
												</div>
											</div>
										</div></li>
								</c:when>
								<c:otherwise>
									<li><div class="stars">
											<span>用户评价：</span> <span class="meth">(尚未评价)</span>
										</div></li>
								</c:otherwise>
							</c:choose>
						</c:if>
					</ul>
				</div>
			</c:if>
		</div>
	</section>
	<section class="total">
		<div>
			总实收：
			¥<fmt:formatNumber value="${detail.payMoney/100 }" pattern="#.00" />
		</div>
	</section>
	<script>
		//显示分数
		$(".show_number  p").each(function(index, element) {
			var num = $(this).attr("tip");
			var www = num * 2 * 9;//
			$(this).css("width", www);
		});
	</script>
</body>
</html>
